package com.forum.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.forum.dao.CourseorderDao;
import com.forum.entity.CourseorderEntity;
import com.forum.entity.view.CourseorderView;
import com.forum.service.CourseorderService;
import com.forum.utils.MyQuery;
import com.forum.utils.PageUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程订单 服务实现类
 * </p>
 *
 * @author 张继成
 * @since 2023-12-31
 */
@Service
public class CourseorderServiceImpl extends ServiceImpl<CourseorderDao, CourseorderEntity> implements CourseorderService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<CourseorderEntity> page=this.selectPage(
                new MyQuery<CourseorderEntity>(params).getPage(),
                new EntityWrapper<CourseorderEntity>()
        );
        return new PageUtils(page);
    }

    @Override
    public List<CourseorderView> selectListView(Wrapper<CourseorderEntity> wrapper) {
        return null;
    }

    @Override
    public CourseorderView selectView(Wrapper<CourseorderEntity> wrapper) {
        return null;
    }

    @Override
    public PageUtils queryPage(Map<String, Object> params, Wrapper<CourseorderEntity> wrapper) {
        Page<CourseorderView> page=new MyQuery<CourseorderView>(params).getPage();
        page.setRecords(baseMapper.selectListView(page,wrapper));
        PageUtils pageUtil=new PageUtils(page);
        return pageUtil;
    }

    @Override
    public List<Map<String, Object>> selectValue(Map<String, Object> params, Wrapper<CourseorderEntity> wrapper) {
        return null;
    }

    @Override
    public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params, Wrapper<CourseorderEntity> wrapper) {
        return null;
    }

    @Override
    public List<Map<String, Object>> selectGroup(Map<String, Object> params, Wrapper<CourseorderEntity> wrapper) {
        return null;
    }
}
